package com.lee;

import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.jwk.JWKSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2021/11/29
 */
@SpringBootApplication
@RestController
public class AuthServerApplication {

	@Autowired
	private JWKSet jwkSet;
	public static void main(String[] args) {
		SpringApplication.run(AuthServerApplication.class, args);
	}

	@GetMapping("/oauth2/keys")
	public String keys() {
		System.out.println(jwkSet.toString());
		return jwkSet.toString();
	}
}
